using System;
using Kugar.Tool.RemoteEventBus.Enums;
using Newtonsoft.Json.Linq;

namespace Kugar.Tool.RemoteEventBus.Triggers
{
    public class ClientEventHandeEventArgs : EventArgs
    {
        public ClientEventHandeEventArgs(string clientID, 
            string eventName, 
            string triggerID,
            EventRelyType type,
            Exception error=null,
            JObject returnValue=null
            )
        {
            ClientID = clientID;
            EventName = eventName;
            TriggerID = triggerID;
            RelyType = RelyType;
            Error = error;
            ReturnValue = returnValue;
        }

        public string ClientID { set; get; }

        public string EventName { set; get; }

        public string TriggerID { set; get; }

        public JObject ReturnValue { set; get; } = null;

        public EventRelyType RelyType { set; get; }

        public Exception Error { set; get; }
    }
}